<template>
  <div class="login">
    <van-nav-bar
      title="标题"
      left-text="返回"
      right-text="按钮"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
    />
  </div>
</template>

<script>
export default {
  name: 'Login',
  data() {
    return {
      mobile: '',
      code: '',
      rules: {
        // 手机号的校验规则
        mobile: [
          {
            required: true,
            message: '手机号不能为空'
          },
          {
            // 手机号的格式 正则
            pattern: /^1[3-9]d{9}$/
          }
        ]
      }
    }
  }
}
</script>

<style></style>
